<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>opennars: nars.inference.CompositionalRules.decomposeCompound</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">opennars
   &#160;<span id="projectnumber">1.5.5</span>
   </div>
   <div id="projectbrief">1.5-ish</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../namespaces.html"><span>Packages</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d8/d79/classnars_1_1inference_1_1CompositionalRules_a4479c479bb3ceeb78130e03ce5e3f293.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="contents">
<a class="anchor" id="a4479c479bb3ceeb78130e03ce5e3f293"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void nars.inference.CompositionalRules.decomposeCompound </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d0/dee/classnars_1_1language_1_1CompoundTerm.html">CompoundTerm</a>&#160;</td>
          <td class="paramname"><em>compound</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a>&#160;</td>
          <td class="paramname"><em>component</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a>&#160;</td>
          <td class="paramname"><em>term1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>compoundTask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a>&#160;</td>
          <td class="paramname"><em>memory</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>{&lt;(S|P) ==&gt; M&gt;, </p>
<p>&lt;P ==&gt; M&gt;} |- &lt;S ==&gt; M&gt;</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">implication</td><td>The implication term to be decomposed </td></tr>
    <tr><td class="paramname">componentCommon</td><td>The part of the implication to be removed </td></tr>
    <tr><td class="paramname">term1</td><td>The other term in the contentInd </td></tr>
    <tr><td class="paramname">index</td><td>The location of the shared term: 0 for subject, 1 for predicate </td></tr>
    <tr><td class="paramname">compoundTask</td><td>Whether the implication comes from the task </td></tr>
    <tr><td class="paramname">memory</td><td>Reference to the memory </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="../../d4/d15/CompositionalRules_8java_source.html#l00189">189</a> of file <a class="el" href="../../d4/d15/CompositionalRules_8java_source.html">CompositionalRules.java</a>.</p>

<p>References <a class="el" href="../../d5/d0e/CompoundTerm_8java_source.html#l00356">nars.language.CompoundTerm.componentAt()</a>, <a class="el" href="../../de/d4e/BudgetFunctions_8java_source.html#l00290">nars.inference.BudgetFunctions.compoundForward()</a>, <a class="el" href="../../db/d0c/Memory_8java_source.html#l00280">nars.storage.Memory.doublePremiseTask()</a>, <a class="el" href="../../d8/df2/Term_8java_source.html#l00094">nars.language.Term.equals()</a>, <a class="el" href="../../d6/d10/Task_8java_source.html#l00108">nars.entity.Task.getContent()</a>, <a class="el" href="../../db/d0c/Memory_8java_source.html#l00647">nars.storage.Memory.getCurrentBelief()</a>, <a class="el" href="../../db/d0c/Memory_8java_source.html#l00625">nars.storage.Memory.getCurrentTask()</a>, <a class="el" href="../../d6/d10/Task_8java_source.html#l00099">nars.entity.Task.getSentence()</a>, <a class="el" href="../../da/d1c/Sentence_8java_source.html#l00165">nars.entity.Sentence.getTruth()</a>, <a class="el" href="../../d5/d0e/CompoundTerm_8java_source.html#l00457">nars.language.CompoundTerm.reduceComponents()</a>, <a class="el" href="../../df/d29/TruthFunctions_8java_source.html#l00407">nars.inference.TruthFunctions.reduceConjunction()</a>, <a class="el" href="../../df/d29/TruthFunctions_8java_source.html#l00421">nars.inference.TruthFunctions.reduceConjunctionNeg()</a>, and <a class="el" href="../../df/d29/TruthFunctions_8java_source.html#l00393">nars.inference.TruthFunctions.reduceDisjunction()</a>.</p>

<p>Referenced by <a class="el" href="../../d4/d15/CompositionalRules_8java_source.html#l00052">nars.inference.CompositionalRules.composeCompound()</a>.</p>
<div class="fragment"><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;                           {</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        <span class="keywordflow">if</span> (compound instanceof <a class="code" href="../../d1/d5e/classnars_1_1language_1_1Statement.html">Statement</a>) {</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;        }</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> term2 = <a class="code" href="../../d0/dee/classnars_1_1language_1_1CompoundTerm.html">CompoundTerm</a>.<a class="code" href="../../d0/dee/classnars_1_1language_1_1CompoundTerm_a09c88a408c16b985b0db4bc602a170aa.html#a09c88a408c16b985b0db4bc602a170aa">reduceComponents</a>(compound, component, memory);</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <span class="keywordflow">if</span> (term2 == null) {</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        }</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        <a class="code" href="../../dc/ddc/classnars_1_1entity_1_1Task.html">Task</a> task = memory.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_a26eda4f00b333b706b4e3d069fdf1508.html#a26eda4f00b333b706b4e3d069fdf1508">getCurrentTask</a>();</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;        <a class="code" href="../../d6/d25/classnars_1_1entity_1_1Sentence.html">Sentence</a> sentence = task.<a class="code" href="../../dc/ddc/classnars_1_1entity_1_1Task_ab140cb553a6cf40b07093d1df283567f.html#ab140cb553a6cf40b07093d1df283567f">getSentence</a>();</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        <a class="code" href="../../d6/d25/classnars_1_1entity_1_1Sentence.html">Sentence</a> belief = memory.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_aae366ea198c2340fef786120d5c2163b.html#aae366ea198c2340fef786120d5c2163b">getCurrentBelief</a>();</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        Statement oldContent = (Statement) task.<a class="code" href="../../dc/ddc/classnars_1_1entity_1_1Task_a091f9ec3bdacfd6741f767cb62b14c0f.html#a091f9ec3bdacfd6741f767cb62b14c0f">getContent</a>();</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;        <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> v1, v2;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        <span class="keywordflow">if</span> (compoundTask) {</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;            v1 = sentence.<a class="code" href="../../d6/d25/classnars_1_1entity_1_1Sentence_a9f69b4fef64c81abad21404946cd41f9.html#a9f69b4fef64c81abad21404946cd41f9">getTruth</a>();</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;            v2 = belief.<a class="code" href="../../d6/d25/classnars_1_1entity_1_1Sentence_a9f69b4fef64c81abad21404946cd41f9.html#a9f69b4fef64c81abad21404946cd41f9">getTruth</a>();</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;            v1 = belief.<a class="code" href="../../d6/d25/classnars_1_1entity_1_1Sentence_a9f69b4fef64c81abad21404946cd41f9.html#a9f69b4fef64c81abad21404946cd41f9">getTruth</a>();</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;            v2 = sentence.<a class="code" href="../../d6/d25/classnars_1_1entity_1_1Sentence_a9f69b4fef64c81abad21404946cd41f9.html#a9f69b4fef64c81abad21404946cd41f9">getTruth</a>();</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;        }</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;        <a class="code" href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">TruthValue</a> truth = null;</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;        <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> content;</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        <span class="keywordflow">if</span> (index == 0) {</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;            content = Statement.make(oldContent, term1, term2, memory);</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;            <span class="keywordflow">if</span> (content == null) {</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;                <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;            }</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;            <span class="keywordflow">if</span> (oldContent instanceof <a class="code" href="../../d0/df3/classnars_1_1language_1_1Inheritance.html">Inheritance</a>) {</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;                <span class="keywordflow">if</span> (compound instanceof <a class="code" href="../../d2/d68/classnars_1_1language_1_1IntersectionExt.html">IntersectionExt</a>) {</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;                    truth = TruthFunctions.reduceConjunction(v1, v2);</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (compound instanceof <a class="code" href="../../d9/df4/classnars_1_1language_1_1IntersectionInt.html">IntersectionInt</a>) {</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;                    truth = TruthFunctions.reduceDisjunction(v1, v2);</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((compound instanceof <a class="code" href="../../d2/dfc/classnars_1_1language_1_1SetInt.html">SetInt</a>)</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;                        &amp;&amp; (component instanceof SetInt)) {</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;                    truth = TruthFunctions.reduceConjunction(v1, v2);</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((compound instanceof <a class="code" href="../../de/d1d/classnars_1_1language_1_1SetExt.html">SetExt</a>)</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;                        &amp;&amp; (component instanceof SetExt)) {</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;                    truth = TruthFunctions.reduceDisjunction(v1, v2);</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (compound instanceof <a class="code" href="../../d3/d12/classnars_1_1language_1_1DifferenceExt.html">DifferenceExt</a>) {</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;                    <span class="keywordflow">if</span> (compound.<a class="code" href="../../d0/dee/classnars_1_1language_1_1CompoundTerm_acedae916705e9fa1669391a7d728b840.html#acedae916705e9fa1669391a7d728b840">componentAt</a>(0).<a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_ad85f45a7858737445d5158801774ff5f.html#ad85f45a7858737445d5158801774ff5f">equals</a>(component)) {</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;                        truth = TruthFunctions.reduceDisjunction(v2, v1);</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;                    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;                        truth = TruthFunctions.reduceConjunctionNeg(v1, v2);</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;                    }</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;                }</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (oldContent instanceof <a class="code" href="../../da/db6/classnars_1_1language_1_1Implication.html">Implication</a>) {</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;                <span class="keywordflow">if</span> (compound instanceof <a class="code" href="../../d6/d98/classnars_1_1language_1_1Conjunction.html">Conjunction</a>) {</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;                    truth = TruthFunctions.reduceConjunction(v1, v2);</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (compound instanceof <a class="code" href="../../d9/d5d/classnars_1_1language_1_1Disjunction.html">Disjunction</a>) {</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;                    truth = TruthFunctions.reduceDisjunction(v1, v2);</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;                }</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;            }</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;            content = Statement.make(oldContent, term2, term1, memory);</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;            <span class="keywordflow">if</span> (content == null) {</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;                <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;            }</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;            <span class="keywordflow">if</span> (oldContent instanceof Inheritance) {</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;                <span class="keywordflow">if</span> (compound instanceof IntersectionInt) {</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;                    truth = TruthFunctions.reduceConjunction(v1, v2);</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (compound instanceof IntersectionExt) {</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;                    truth = TruthFunctions.reduceDisjunction(v1, v2);</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((compound instanceof SetExt)</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;                        &amp;&amp; (component instanceof SetExt)) {</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;                    truth = TruthFunctions.reduceConjunction(v1, v2);</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((compound instanceof SetInt)</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;                        &amp;&amp; (component instanceof SetInt)) {</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;                    truth = TruthFunctions.reduceDisjunction(v1, v2);</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (compound instanceof <a class="code" href="../../d4/d5b/classnars_1_1language_1_1DifferenceInt.html">DifferenceInt</a>) {</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;                    <span class="keywordflow">if</span> (compound.<a class="code" href="../../d0/dee/classnars_1_1language_1_1CompoundTerm_acedae916705e9fa1669391a7d728b840.html#acedae916705e9fa1669391a7d728b840">componentAt</a>(1).<a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_ad85f45a7858737445d5158801774ff5f.html#ad85f45a7858737445d5158801774ff5f">equals</a>(component)) {</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;                        truth = TruthFunctions.reduceDisjunction(v2, v1);</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;                    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;                        truth = TruthFunctions.reduceConjunctionNeg(v1, v2);</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;                    }</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;                }</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (oldContent instanceof Implication) {</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;                <span class="keywordflow">if</span> (compound instanceof <a class="code" href="../../d9/d5d/classnars_1_1language_1_1Disjunction.html">Disjunction</a>) {</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;                    truth = TruthFunctions.reduceConjunction(v1, v2);</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;                } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (compound instanceof Conjunction) {</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;                    truth = TruthFunctions.reduceDisjunction(v1, v2);</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;                }</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;            }</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;        }</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;        <span class="keywordflow">if</span> (truth != null) {</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;            <a class="code" href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">BudgetValue</a> budget = <a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions.html">BudgetFunctions</a>.<a class="code" href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a74ebb7970c0561c3407df43a68bbfe84.html#a74ebb7970c0561c3407df43a68bbfe84">compoundForward</a>(truth,</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;                    content, memory);</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;            memory.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_a077b38e451ff6e4217bdc2ff0bb08e70.html#a077b38e451ff6e4217bdc2ff0bb08e70">doublePremiseTask</a>(content, truth, budget);</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;        }</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;    }</div>
<div class="ttc" id="classnars_1_1entity_1_1Sentence_a9f69b4fef64c81abad21404946cd41f9_html_a9f69b4fef64c81abad21404946cd41f9"><div class="ttname"><a href="../../d6/d25/classnars_1_1entity_1_1Sentence_a9f69b4fef64c81abad21404946cd41f9.html#a9f69b4fef64c81abad21404946cd41f9">nars.entity.Sentence.getTruth</a></div><div class="ttdeci">TruthValue getTruth()</div><div class="ttdoc">Get the truth value of the sentence. </div><div class="ttdef"><b>Definition:</b> <a href="../../da/d1c/Sentence_8java_source.html#l00165">Sentence.java:165</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Conjunction_html"><div class="ttname"><a href="../../d6/d98/classnars_1_1language_1_1Conjunction.html">nars.language.Conjunction</a></div><div class="ttdoc">Conjunction of statements. </div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d2f/Conjunction_8java_source.html#l00031">Conjunction.java:31</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Inheritance_html"><div class="ttname"><a href="../../d0/df3/classnars_1_1language_1_1Inheritance.html">nars.language.Inheritance</a></div><div class="ttdoc">A Statement about an Inheritance relation. </div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d17/Inheritance_8java_source.html#l00031">Inheritance.java:31</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1DifferenceExt_html"><div class="ttname"><a href="../../d3/d12/classnars_1_1language_1_1DifferenceExt.html">nars.language.DifferenceExt</a></div><div class="ttdoc">A compound term whose extension is the difference of the extensions of its components. </div><div class="ttdef"><b>Definition:</b> <a href="../../dd/d93/DifferenceExt_8java_source.html#l00031">DifferenceExt.java:31</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1SetExt_html"><div class="ttname"><a href="../../de/d1d/classnars_1_1language_1_1SetExt.html">nars.language.SetExt</a></div><div class="ttdoc">An extensionally defined set, which contains one or more instances. </div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d96/SetExt_8java_source.html#l00031">SetExt.java:31</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_a26eda4f00b333b706b4e3d069fdf1508_html_a26eda4f00b333b706b4e3d069fdf1508"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_a26eda4f00b333b706b4e3d069fdf1508.html#a26eda4f00b333b706b4e3d069fdf1508">nars.storage.Memory.getCurrentTask</a></div><div class="ttdeci">Task getCurrentTask()</div><div class="ttdoc">The selected Task. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00625">Memory.java:625</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Task_html"><div class="ttname"><a href="../../dc/ddc/classnars_1_1entity_1_1Task.html">nars.entity.Task</a></div><div class="ttdoc">A task to be processed, consists of a Sentence and a BudgetValue. </div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d10/Task_8java_source.html#l00035">Task.java:35</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Statement_html"><div class="ttname"><a href="../../d1/d5e/classnars_1_1language_1_1Statement.html">nars.language.Statement</a></div><div class="ttdoc">A statement is a compound term, consisting of a subject, a predicate, and a relation symbol in betwee...</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d44/Statement_8java_source.html#l00033">Statement.java:33</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Task_ab140cb553a6cf40b07093d1df283567f_html_ab140cb553a6cf40b07093d1df283567f"><div class="ttname"><a href="../../dc/ddc/classnars_1_1entity_1_1Task_ab140cb553a6cf40b07093d1df283567f.html#ab140cb553a6cf40b07093d1df283567f">nars.entity.Task.getSentence</a></div><div class="ttdeci">Sentence getSentence()</div><div class="ttdoc">Get the sentence. </div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d10/Task_8java_source.html#l00099">Task.java:99</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1DifferenceInt_html"><div class="ttname"><a href="../../d4/d5b/classnars_1_1language_1_1DifferenceInt.html">nars.language.DifferenceInt</a></div><div class="ttdoc">A compound term whose extension is the difference of the intensions of its components. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d99/DifferenceInt_8java_source.html#l00031">DifferenceInt.java:31</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1CompoundTerm_a09c88a408c16b985b0db4bc602a170aa_html_a09c88a408c16b985b0db4bc602a170aa"><div class="ttname"><a href="../../d0/dee/classnars_1_1language_1_1CompoundTerm_a09c88a408c16b985b0db4bc602a170aa.html#a09c88a408c16b985b0db4bc602a170aa">nars.language.CompoundTerm.reduceComponents</a></div><div class="ttdeci">static Term reduceComponents(CompoundTerm t1, Term t2, Memory memory)</div><div class="ttdoc">Try to remove a component from a compound. </div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d0e/CompoundTerm_8java_source.html#l00457">CompoundTerm.java:457</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1SetInt_html"><div class="ttname"><a href="../../d2/dfc/classnars_1_1language_1_1SetInt.html">nars.language.SetInt</a></div><div class="ttdoc">An intensionally defined set, which contains one or more instances defining the Term. </div><div class="ttdef"><b>Definition:</b> <a href="../../dc/dfd/SetInt_8java_source.html#l00031">SetInt.java:31</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_a74ebb7970c0561c3407df43a68bbfe84_html_a74ebb7970c0561c3407df43a68bbfe84"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions_a74ebb7970c0561c3407df43a68bbfe84.html#a74ebb7970c0561c3407df43a68bbfe84">nars.inference.BudgetFunctions.compoundForward</a></div><div class="ttdeci">static BudgetValue compoundForward(TruthValue truth, Term content, Memory memory)</div><div class="ttdoc">Forward inference with CompoundTerm conclusion. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00290">BudgetFunctions.java:290</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1IntersectionExt_html"><div class="ttname"><a href="../../d2/d68/classnars_1_1language_1_1IntersectionExt.html">nars.language.IntersectionExt</a></div><div class="ttdoc">A compound term whose extension is the intersection of the extensions of its components. </div><div class="ttdef"><b>Definition:</b> <a href="../../da/d42/IntersectionExt_8java_source.html#l00031">IntersectionExt.java:31</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Task_a091f9ec3bdacfd6741f767cb62b14c0f_html_a091f9ec3bdacfd6741f767cb62b14c0f"><div class="ttname"><a href="../../dc/ddc/classnars_1_1entity_1_1Task_a091f9ec3bdacfd6741f767cb62b14c0f.html#a091f9ec3bdacfd6741f767cb62b14c0f">nars.entity.Task.getContent</a></div><div class="ttdeci">Term getContent()</div><div class="ttdoc">Directly get the content of the sentence. </div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d10/Task_8java_source.html#l00108">Task.java:108</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Sentence_html"><div class="ttname"><a href="../../d6/d25/classnars_1_1entity_1_1Sentence.html">nars.entity.Sentence</a></div><div class="ttdoc">A Sentence is an abstract class, mainly containing a Term, a TruthValue, and a Stamp. </div><div class="ttdef"><b>Definition:</b> <a href="../../da/d1c/Sentence_8java_source.html#l00031">Sentence.java:31</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_ad85f45a7858737445d5158801774ff5f_html_ad85f45a7858737445d5158801774ff5f"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term_ad85f45a7858737445d5158801774ff5f.html#ad85f45a7858737445d5158801774ff5f">nars.language.Term.equals</a></div><div class="ttdeci">boolean equals(Object that)</div><div class="ttdoc">Equal terms have identical name, though not necessarily the same reference. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00094">Term.java:94</a></div></div>
<div class="ttc" id="classnars_1_1inference_1_1BudgetFunctions_html"><div class="ttname"><a href="../../d7/d11/classnars_1_1inference_1_1BudgetFunctions.html">nars.inference.BudgetFunctions</a></div><div class="ttdoc">Budget functions for resources allocation. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d4e/BudgetFunctions_8java_source.html#l00031">BudgetFunctions.java:31</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1TruthValue_html"><div class="ttname"><a href="../../d3/db8/classnars_1_1entity_1_1TruthValue.html">nars.entity.TruthValue</a></div><div class="ttdoc">Frequency and confidence. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/de7/TruthValue_8java_source.html#l00028">TruthValue.java:28</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Disjunction_html"><div class="ttname"><a href="../../d9/d5d/classnars_1_1language_1_1Disjunction.html">nars.language.Disjunction</a></div><div class="ttdoc">A disjunction of Statements. </div><div class="ttdef"><b>Definition:</b> <a href="../../da/db5/Disjunction_8java_source.html#l00031">Disjunction.java:31</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_html"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term.html">nars.language.Term</a></div><div class="ttdoc">Term is the basic component of Narsese, and the object of processing in NARS. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00040">Term.java:40</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1CompoundTerm_acedae916705e9fa1669391a7d728b840_html_acedae916705e9fa1669391a7d728b840"><div class="ttname"><a href="../../d0/dee/classnars_1_1language_1_1CompoundTerm_acedae916705e9fa1669391a7d728b840.html#acedae916705e9fa1669391a7d728b840">nars.language.CompoundTerm.componentAt</a></div><div class="ttdeci">Term componentAt(int i)</div><div class="ttdoc">get a component by index </div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d0e/CompoundTerm_8java_source.html#l00356">CompoundTerm.java:356</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_aae366ea198c2340fef786120d5c2163b_html_aae366ea198c2340fef786120d5c2163b"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_aae366ea198c2340fef786120d5c2163b.html#aae366ea198c2340fef786120d5c2163b">nars.storage.Memory.getCurrentBelief</a></div><div class="ttdeci">Sentence getCurrentBelief()</div><div class="ttdoc">The selected belief. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00647">Memory.java:647</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1CompoundTerm_html"><div class="ttname"><a href="../../d0/dee/classnars_1_1language_1_1CompoundTerm.html">nars.language.CompoundTerm</a></div><div class="ttdoc">A CompoundTerm is a Term with internal (syntactic) structure. </div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d0e/CompoundTerm_8java_source.html#l00036">CompoundTerm.java:36</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_a077b38e451ff6e4217bdc2ff0bb08e70_html_a077b38e451ff6e4217bdc2ff0bb08e70"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_a077b38e451ff6e4217bdc2ff0bb08e70.html#a077b38e451ff6e4217bdc2ff0bb08e70">nars.storage.Memory.doublePremiseTask</a></div><div class="ttdeci">void doublePremiseTask(Term newContent, TruthValue newTruth, BudgetValue newBudget)</div><div class="ttdoc">Shared final operations by all double-premise rules, called from the rules except StructuralRules...</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00280">Memory.java:280</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1BudgetValue_html"><div class="ttname"><a href="../../db/d8e/classnars_1_1entity_1_1BudgetValue.html">nars.entity.BudgetValue</a></div><div class="ttdoc">A triple of priority (current), durability (decay), and quality (long-term average). </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d59/BudgetValue_8java_source.html#l00031">BudgetValue.java:31</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1IntersectionInt_html"><div class="ttname"><a href="../../d9/df4/classnars_1_1language_1_1IntersectionInt.html">nars.language.IntersectionInt</a></div><div class="ttdoc">A compound term whose intension is the intersection of the extensions of its components. </div><div class="ttdef"><b>Definition:</b> <a href="../../de/d9f/IntersectionInt_8java_source.html#l00031">IntersectionInt.java:31</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Implication_html"><div class="ttname"><a href="../../da/db6/classnars_1_1language_1_1Implication.html">nars.language.Implication</a></div><div class="ttdoc">A Statement about an Inheritance relation. </div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d1a/Implication_8java_source.html#l00031">Implication.java:31</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d8/d79/classnars_1_1inference_1_1CompositionalRules_a4479c479bb3ceeb78130e03ce5e3f293_a4479c479bb3ceeb78130e03ce5e3f293_cgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</p>

<p><div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d8/d79/classnars_1_1inference_1_1CompositionalRules_a4479c479bb3ceeb78130e03ce5e3f293_a4479c479bb3ceeb78130e03ce5e3f293_icgraph.svg" width="100%" height="300"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d7/d81/namespacenars.html">nars</a></li><li class="navelem"><a class="el" href="../../d9/d79/namespacenars_1_1inference.html">inference</a></li><li class="navelem"><a class="el" href="../../d8/d79/classnars_1_1inference_1_1CompositionalRules.html">CompositionalRules</a></li>
    <li class="footer">Generated on Sun Jan 10 2016 18:03:59 for opennars by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
